-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Export API Errors #1361
feat: Export API Errors #1361
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
2dab0da
to
3d13823
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 5c3ddb2:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
In the past, I tested this SKU loader and it's not working as expected.
Maybe it's a good opportunity to change it now.
throw new Error( | ||
`Search API did not return the following skus: ${missingSkus.join(',')}` | ||
throw new NotFoundError( | ||
`Search API did not found the following skus: ${missingSkus.join(',')}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the time I tested it, it was not working as expected.
Maybe it's a good opportunity to improve this logic here. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NICE! Sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this pull request?
This PR exports some errors we throw inside of
@faststore/api
so starters can catch these errors and respond accordingly. For instance, starters can respond 404 when aNotFoundError
is thrown inside@faststore/api
.Starters Deploy Preview